<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Coisas que estao na BD</title>
<%
    PersistenceManager pm = PMF.get().getPersistenceManager();
    String query = "select from " + Empregado.class.getName() + " order by date desc range 0,5";
    List<Empregado> emp = (List<Empregado>) pm.newQuery(query).execute();
    if (emp.isEmpty()) {
%><p>Nao ha nada na BD.
<%
    } else {
        for (Empregado e : emp) {
           e.getNome().toString();
			e.getCurso().toString();
        }
    }
    pm.close();
%>
</head>
<body>

</body>
</html>